# -*- coding: utf-8 -*-
import scrapy
from xicidaili.items import XicidailiItem

class A404vSpider(scrapy.Spider):
    name = '404v'
    allowed_domains = ['404v.com']
    start_urls = ['http://404v.com/']

    def parse(self, response):
        # print(response.body)
        # content = response.xpath('//*[@id="newslist"]/ul[5]/li')
        dbsgw_content = response.xpath('//*[@id="newslist"]/ul/li')
        for i in dbsgw_content:
            item = XicidailiItem()
            item['name'] = i.xpath('./a/text()').get()
            item['url'] = i.xpath('./a/@href').get()
            yield item
